﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Ex03.GarageLogic
{
    public class ElectricCar : Car
    {
        private const float k_ElectricCarMaximumBatteryLifeInHours = 2.5F;
        private const EnergyType.eEnergyType k_ElectricCarBatteryType = EnergyType.eEnergyType.NiMHBattery;
        private const int k_ElectricCarWheelAmount = 4;
        private const float k_ElectricCarWheelMaximumAirPressure = 29F;

        private ElectricPropulsion m_ElectricCarPropulsionType;

        public ElectricCar(
            string i_ElectricCarModelName,
            string i_ElectricCarLicenseNumber,
            eCarColor i_ElectricCarColor,
            eDoorsAmount i_ElectricCarDoorsAmount)
            : base(
            i_ElectricCarModelName,
            i_ElectricCarLicenseNumber, 
            k_ElectricCarWheelAmount,
            k_ElectricCarWheelMaximumAirPressure,
            i_ElectricCarColor,
            i_ElectricCarDoorsAmount)
        {
            m_ElectricCarPropulsionType = new ElectricPropulsion(k_ElectricCarBatteryType, k_ElectricCarMaximumBatteryLifeInHours);
        }

        public override bool AddPropulsionMaterial(
            EnergyType.eEnergyType i_PropulsionMaterialType,
            float i_PropulsionMaterialAmountToAdd)
        {
            return m_ElectricCarPropulsionType.AddPropulsionMaterial(i_PropulsionMaterialType, i_PropulsionMaterialAmountToAdd);
        }
    }
}
